package com.example.dto.business;

import com.example.pojo.UserDynamicComment;
import com.example.vo.user.Publisher;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.Date;

/**
 * @author LeXin Huang
 * @date 2021年04月18日 10:58
 */
@ApiModel("用户评论")
@Data
@ToString
public class DynamicCommentBusinessDTO {
    private Integer commentId;

    @ApiModelProperty("评论内容")
    private String content;

    @ApiModelProperty("评论时间")
    private Date commentTime;

    private Boolean isMineComment;

    @ApiModelProperty("评论者信息")
    private Publisher commenter;

    public DynamicCommentBusinessDTO(UserDynamicComment comment) {
        this.commentId = comment.getId();
        this.commentTime = comment.getCommentTime();
        this.content = comment.getContent();

    }
}
